﻿<Window x:Class="DL.PhotoCollage.UI.StandAlone.Views.SetupWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Photo Collage" 
        Background="{StaticResource DarkGrayBrush}"
        Height="345" Width="530" 
        WindowStartupLocation="CenterScreen" 
        ResizeMode="NoResize" 
        Loaded="Window_Loaded">
    <Grid Margin="10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="125" />
            <ColumnDefinition Width="300" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Canvas Grid.ColumnSpan="3" 
                Height="50"
                Margin="0, 0, 0, 15">
            <TextBlock Text="Photo Collage"
                       FontSize="20"
                       Foreground="White" />
            <TextBlock Text="by Digital Lagniappe"
                       Canvas.Left="5"
                       Canvas.Top="24"
                       Foreground="White" />
        </Canvas>

        <Label Content="Directory:"
               Grid.Row="1"
               Target="{Binding ElementName=DirectoryTextBox}" />
        <TextBox x:Name="DirectoryTextBox"
                 Grid.Row="1"
                 Grid.Column="1"
                 Foreground="Black"
                 IsReadOnly="True"
                 Text="{Binding Configuration.Directory}" />
        <Button x:Name="DirectorySelectButton"
                Content="Select"
                Grid.Row="1"
                Grid.Column="2"
                Margin="5" Click="DirectorySelectButton_Click" />

        <Label Content="Number of Photos:" 
               Target="{Binding ElementName=numberOfPhotosSlider}"
               Grid.Row="2" />
        <Slider x:Name="numberOfPhotosSlider" 
                Grid.Row="2"
                Grid.Column="1" 
                Value="{Binding Configuration.NumberOfPhotos}"
                Minimum="5" 
                Maximum="30"
                IsSnapToTickEnabled="True" 
                TickFrequency="5" />
        <TextBlock x:Name="numberOfPhotosTextBlock"
                   Grid.Row="2"
                   Grid.Column="2"
                   Text="{Binding Configuration.NumberOfPhotos}"
                   Foreground="White"
                   Padding="5, 5, 5, 5" />

        <Label Content="Speed:"
               Target="{Binding ElementName=SpeedComboBox}"
               Grid.Row="3" />
        <ComboBox x:Name="SpeedComboBox" 
                  Grid.Row="3"
                  Grid.Column="1" SelectionChanged="SpeedComboBox_SelectionChanged">
            <ComboBoxItem Content="Slow" />
            <ComboBoxItem Content="Medium" />
            <ComboBoxItem Content="Fast" />
        </ComboBox>

        <Label Content="Random?"
               Target="{Binding ElementName=IsRandomCheckBox}"
               Grid.Row="4"/>
        <CheckBox x:Name="IsRandomCheckBox"
                  IsChecked="{Binding Configuration.IsRandom}"
                  Grid.Row="4" 
                  Grid.Column="1" 
                  Margin="10, 0, 0, 0"
                  VerticalAlignment="Center" />

        <Label Content="Grayscale?"
               Target="{Binding ElementName=IsGrayscaleCheckBox}"
               Grid.Row="5"/>
        <CheckBox x:Name="IsGrayscaleCheckBox"
                  IsChecked="{Binding Configuration.IsGrayscale}"
                  Grid.Row="5" 
                  Grid.Column="1" 
                  Margin="10, 0, 0, 0"
                  VerticalAlignment="Center" />

        <Label Content="Borders?"
               Target="{Binding ElementName=ShowBordersCheckBox}"
               Grid.Row="6"/>
        <CheckBox x:Name="ShowBordersCheckBox"
                  IsChecked="{Binding Configuration.ShowPhotoBorder}"
                  Grid.Row="6" 
                  Grid.Column="1" 
                  Margin="10, 0, 0, 0"
                  VerticalAlignment="Center" />

        <StackPanel Orientation="Horizontal" 
                    HorizontalAlignment="Right"
                    Margin="0, 5, 0, 0"
                    Grid.Row="7" 
                    Grid.ColumnSpan="3">
            <TextBlock Text="Press 'Enter' or 'Esc' to exit collage mode." 
                       TextAlignment="Left"
                       VerticalAlignment="Center"
                       Foreground="White" Width="355" />
            <Button x:Name="StartButton"
                    Content="Start" Click="StartButton_Click" />
            <Button x:Name="CloseButton"
                    Content="Close" Click="CloseButton_Click" />
        </StackPanel>
    </Grid>
</Window>

